// WzPageAniTypeDelay.cpp : implementation file
//

#include "stdafx.h"
#include "ansieditor.h"
#include "WzPageAniTypeDelay.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CWzPageAniTypeDelay dialog


CWzPageAniTypeDelay::CWzPageAniTypeDelay(CWnd* pParent /*=NULL*/)
	: CWizardPage(CWzPageAniTypeDelay::IDD, pParent)
{
	//{{AFX_DATA_INIT(CWzPageAniTypeDelay)
	//}}AFX_DATA_INIT
	m_pFocusTarget = &m_txtTimingBase;
}


void CWzPageAniTypeDelay::DoDataExchange(CDataExchange* pDX)
{
	CWizardPage::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CWzPageAniTypeDelay)
	DDX_Control(pDX, IDC_SPIN_MAXLINELEN, m_spinMaxLineLen);
	DDX_Control(pDX, IDC_SPIN_TIMINGBASE, m_spinTimingBase);
	DDX_Control(pDX, IDC_TXT_TIMINGBASE, m_txtTimingBase);
	//}}AFX_DATA_MAP
	DDX_Text(pDX, IDC_TXT_TIMINGBASE, m_pData->m_nTimingBase);
	DDV_MinMaxInt(pDX, m_pData->m_nTimingBase, 1, 500);
	DDX_Text(pDX, IDC_TXT_MAXLINELEN, m_pData->m_nMaxLineLen);
	DDV_MinMaxInt(pDX, m_pData->m_nMaxLineLen, 50, 500);
}


BEGIN_MESSAGE_MAP(CWzPageAniTypeDelay, CWizardPage)
	//{{AFX_MSG_MAP(CWzPageAniTypeDelay)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CWzPageAniTypeDelay message handlers

BOOL CWzPageAniTypeDelay::OnInitDialog() 
{
	CWizardPage::OnInitDialog();
	
	m_spinTimingBase.SetRange32(1, 500);
	m_spinMaxLineLen.SetRange32(50, 500);
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

BOOL CWzPageAniTypeDelay::ValidatePage()
{
	UpdateData();
	return CWizardPage::ValidatePage();
}
